#include<stdio.h>//1 
#include<math.h>
int main()
{
	char c;
	while(1)
	{
		scanf("%c",&c);
		if(c=='x')
		{
			printf("X");
		}
		else if(c=='#')
		{
			break;
		}
		else
		{
			printf("%c",c);
		}
    }
    return 0;
} 

#include<stdio.h>//2
#include<math.h>
int main()
{
    int m,n,cs=0;
    int i,limit,k,flag,count=0;
	scanf("%d%d",&m,&n);
    if(m<1||n>500||m>n)
    {
    	printf("Inv");
    }
    else
    {
    	for(k=m;k<=n;k++)
    	{
    		if(k<=1)
    		{
    			flag=0;
    		}
			else if(k==2)
    		{
    			flag=1;
    		}
    		else
    		{
    			flag=1;
    			limit=sqrt(k)+1;
    			for(i=2;i<=limit;i++)
    			{
    				if(k%i==0)
    				{
    					flag=0;
    					break;
    				}
    			}
    		}
    		if(flag==1)
    		{
    			count++;
    			cs=cs+k;
    		}
    	}
    }
    printf("%d %d",count,cs);
    return 0;
}

#include<stdio.h>//3 
int main()
{
	int n,i,j;
	char ch='A';
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		for(j=n-i;j>0;j--)
		{
			printf("%c ", ch);
			ch++;
		}
		printf("\n");
	}
	return 0;
}

#include<stdio.h>//4 
int main()
{
    int money,i=0;
   	int a,b,c;
    scanf("%d",&money);
   	for(c=money;c>0;c--) 
	{
    	for(b=money/2;b>0;b--)
		{
            for(a=money/5;a>0;a--)
			{
                if(a*5+b*2+c==money)
				{
                    printf("0.%d dollar equals to %d corns, including %d 5-cent, %d 2-cent and %d 1-cent coins.\n",money,a+b+c,a,b,c);
                    i++;
                }
            }
        }
        
    }
    return 0;
}
